﻿{
	"definitions": [//Dyes: Black=0 Red =1 Green=2 Brown=3 Blue=4 Purple=5 UNU=6 Silver=7 Grey=8 Pink=9 Lime=10 Yellow=11 Light Blue=12 Magenta=13 Orange=14 White=15
		{
			"name": "§2PMC Freightmaster Sleeper Cab",
			"subName": "",
			"extraMaterialLists": [[]]
		}
	],

	"general": {
		"description": "Heavy Truck Bed\nDual Axle",
		"stackSize": 1,
		"materialLists": [["mts:unuparts.unuparts_crafting_unu_sheetmetal_panel_steel:0:10", "minecraft:glass_pane:0:2"]]
	},	
	
	"generic": {
		"type": "generic_bodypart_unu_truckbed_heavy_double",
		"useVehicleTexture": true,
		"mustBeRemovedByScrewdriver": false,
		"width": 2,
		"height": 0.25
	},
	
	"subParts": [
		{
			"pos": [0.001, 0, 0],
			"types": ["generic_bodypart_unu_truckbed_heavy_double", "generic_bodypart_unu_truckbed_freightmaster_sleeper1_double"],
			"conditionalDefaultParts": {
				"truckbed_tanker"="unucivil:unucivil_bodypart_unu_truckbed_heavy_double_tanker_unu",
				"truckbed_fifthwheel"="unuparts:unuparts_bodypart_unu_truckbed_heavy_double_fifthwheel"
			},
			"minValue": 0,
			"maxValue": 3
		},
		{
			"pos": [0.1875, 0.1875, 3.125],
			"rot": [0, 90, 0],
			"types": ["interactable_luggage"],
			"minValue": 0,
			"maxValue": 2,
			"interactableVariables": [["door_Drawer"]],
			"applyAfter": "$Drawer"
		},
		{
			"pos": [-0.875, 0.1875, 3.125],
			"rot": [0, 90, 0],
			"types": ["interactable_luggage"],
			"minValue": 0,
			"maxValue": 2,
			"interactableVariables": [["door_Drawer"]],
			"applyAfter": "$Drawer"
		}
	],
	
	"collisionGroups": [
		{
			"isInterior": true,
			"collisions": [
				{
					"pos": [-1.46875, 0.15625, 3.125],
					"width": 0.25,
					"height": 0.25,
					"variableName": "door_Drawer"
				}
			],
			"applyAfter": "$Drawer"
		},
		{
			"isInterior": true,
			"collisions": [
				{
					"pos": [-1.0625, 1.34375, 3.5625],
					"width": 0.25,
					"height": 0.25,
					"variableName": "CurtainBed"
				}
			],
			"applyAfter": "$Cab",
			"animations": [
				{
					"animationType": "translation",
					"axis": [1.75, 0, 0],
					"variable": "CurtainBed",
					"duration": 10
				}
			]
		},
		{
			"isInterior": true,
			"collisions": [
				{
					"pos": [0, 1.75, 2.75],
					"width": 0.25,
					"height": 0.25,
					"variableName": "ShadeB"
				}
			],
			"applyAfter": "$ShadePullB"
		},
		{
			"collisions": [
				{
					"pos" : [0, 2.1875, 2.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [0, 2.1875, 3.3125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [0, 2.125, 3.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-0.5625, 2.125, 3.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-0.5625, 2.1875, 3.3125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-0.5625, 2.1875, 2.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-1.125, 2.125, 3.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-1.125, 2.1875, 3.3125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [-1.125, 2.1875, 2.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [0.5625, 2.125, 3.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [0.5625, 2.1875, 3.3125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [0.5625, 2.1875, 2.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [1.125, 2.1875, 3.3125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [1.125, 2.1875, 2.8125],
					"width" : 0.5,
					"height" : 0.125
				},
				{
					"pos" : [1.125, 2.125, 3.8125],
					"width" : 0.5,
					"height" : 0.125
				}
			],
			"applyAfter": "$Cab"
		}
	],

	"rendering": {
		"animatedObjects": [
			{
				"objectName": "$Cab",
				"animations": [
					{
						"animationType": "translation",
						"variable": "part_frontDistance",
						"axis": [0, 0, 1],
						"offset": -4.03125
					}
				]
			},
			{
				"objectName": "$Window_R",
				"applyAfter": "$Cab",
				"animations": []
			},
			{
				"objectName": "$Window_Back",
				"applyAfter": "$Cab",
				"animations": []
			},
			{
				"objectName": "$Drawer",
				"applyAfter": "$Cab",
				"animations": [
					{
						"animationType": "translation",
						"variable": "door_Drawer",
						"axis": [-1.75, 0, 0],
						"duration": 20
					}
				]
			},
			{
				"objectName": "$CurtainBed",
				"applyAfter": "$Cab",
				"animations": [
					{
						"animationType": "scaling",
						"centerPoint": [-1.3125, 1.34375, 3.5625],
						"axis": [7, 0, 0],
						"variable": "CurtainBed",
						"offset": 1,
						"duration": 10
					}
				]
			},
			{
				"objectName": "$ShadeB",
				"applyAfter": "$Cab",
				"animations": [
					{
						"animationType": "scaling",
						"centerPoint": [0, 1.875, 2.75],
						"axis": [0, 8, 0],
						"variable": "ShadeB",
						"offset": 1,
						"duration": 10
					}
				]
			},
			{
				"objectName": "$ShadePullB",
				"applyAfter": "$Cab",
				"animations": [
					{
						"animationType": "translation",
						"centerPoint": [0, 1.625, -0.59375],
						"axis": [0, -0.5, 0],
						"variable": "ShadeB",
						"duration": 10
					}
				]
			}
		],
		"sounds": [
			{
				"name": "unuparts:unuparts_rotation_unu_doorcargo_3_open",
				"activeAnimations": [
					{
						"animationType": "visibility",
						"variable": "door_Drawer",
						"clampMin": 1,
						"clampMax": 1,
						"forwardsDelay": 0,
						"reverseDelay": 0
					}
				]
			},
			{
				"name": "unuparts:unuparts_rotation_unu_doorcargo_3_close",
				"activeAnimations": [
					{
						"animationType": "visibility",
						"variable": "door_Drawer",
						"clampMin": 0,
						"clampMax": 0,
						"forwardsDelay": 0,
						"reverseDelay": 20
					}
				]
			}
		]
	},
	
	"constantValues": {
		"unuisbest": 1,
		//"part_frontDistance": 4.15625,
		//"part_backDistance": 1.46875,
		"part_cabwallDelete": 1
	},
	
	"variableModifiers": [
		{
			"variable": "part_frontDistance",
			"animations": [
				{
					"animationType": "translation",
					"variable": "unuisbest",
					"axis": [0, 0, 4.03125]
				},
				{
					"animationType": "inhibitor",
					"variable": "part_present_1",
					"clampMin": 0,
					"clampMax": 0
				},
				{
					"animationType": "translation",
					"variable": "part_frontDistance_1",
					"axis": [0, 1, 0],
					"offset": -2.53125
				}
			]
		},
		{
			"variable": "part_backDistance",
			"animations": [
				{
					"animationType": "translation",
					"variable": "unuisbest",
					"axis": [0, 0, 1.46875]
				},
				{
					"animationType": "inhibitor",
					"variable": "part_present_1",
					"clampMin": 0,
					"clampMax": 0
				},
				{
					"animationType": "translation",
					"variable": "part_backDistance_1",
					"axis": [0, 0, 1]
				}
			]
		},
		{
			"variable": "part_bumperDelete",
			"animations": [
				{
					"animationType": "translation",
					"variable": "part_bumperDelete_1",
					"axis": [0, 0, 1]
				}
			]
		}
	]
}
